package com.web.base.core.message;

import com.blue.core.dict.State;
import com.blue.validation.group.SaveModel;
import com.blue.validation.group.UpdateModel;

import javax.validation.constraints.NotBlank;
import javax.validation.constraints.NotNull;
import javax.validation.constraints.Null;
import javax.validation.constraints.Size;
import java.io.Serializable;

/**
 * 银行请求内容
 * 
 * @author 代码由 blue-code 框架生成
 * @since 1.0 2018年06月19日
 */
 public class BankRequest implements Serializable
{
	private static final long serialVersionUID = 1L;
	
	@NotNull(groups = { UpdateModel.class }, message = "编号不能为空")
	@Null(groups={SaveModel.class}, message="编号必须为空")
	private Integer id; // 编号
	@NotBlank(groups = { SaveModel.class }, message = "代码不能为空")
	@Size(min = 0, max = 20, groups = { SaveModel.class, UpdateModel.class }, message = "代码长度[0-20]")
	private String code; // 代码
	@NotBlank(groups = { SaveModel.class }, message = "名称不能为空")
	@Size(min = 0, max = 50, groups = { SaveModel.class, UpdateModel.class }, message = "名称长度[0-50]")
	private String name; // 名称
	@Size(min = 0, max = 50, groups = { SaveModel.class, UpdateModel.class }, message = "短名称长度[0-50]")
	private String shortName; // 短名称
	private Integer sort; // 排序：升序排列
	private State state; // 状态：0正常，1作废
	
	public BankRequest()
	{
	}
	
	public Integer getId()
	{
		return this.id;
	}
	
	public void setId(Integer id)
	{
		this.id = id;
	}
	
	public String getCode()
	{
		return this.code;
	}
	
	public void setCode(String code)
	{
		this.code = code;
	}
	
	public String getName()
	{
		return this.name;
	}
	
	public void setName(String name)
	{
		this.name = name;
	}
	
	public String getShortName()
	{
		return this.shortName;
	}
	
	public void setShortName(String shortName)
	{
		this.shortName = shortName;
	}
	
	public Integer getSort()
	{
		return this.sort;
	}
	
	public void setSort(Integer sort)
	{
		this.sort = sort;
	}
	
	public State getState()
	{
		return this.state;
	}
	
	public void setState(State state)
	{
		this.state = state;
	}
	
}
